package 代码记录.Bit48天集训;

import java.util.Scanner;

/**答案已订正
 * 1.井字棋
 * 2.密码强度等级
 * @author zx
 * @create 2022-04-28 19:45
 */
public class day_10 {
    /**
     * @return
     */
    public boolean checkWon(int[][] board) {
        boolean flag = false;
        if (board[0][0] + board[1][1] + board[2][2] == 3 || board[0][2] + board[1][1] + board[2][0] == 3) {
            flag = true;
        }
        for (int i = 0; i < 3; i++) {
            if (board[i][0] + board[i][1] + board[i][2] == 3 || board[0][i] + board[1][i] + board[2][i] == 3){
                flag = true;
            }
        }
        return flag;
    }

    /**
     * 2.密码强度等级(自己做出来了)
     */
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int res = 0;
        int n = str.length();
        if(n <= 4){
            res += 5;
        }else if(n > 4 && n < 8){
            res += 10;
        }else if(n > 8){
            res += 25;
        }
        int[] arr = new int[256];
        for(int i = 0;i < str.length();i++){
            arr[(int)str.charAt(i)]++;
        }
        int xiaoNum = 0;
        int daNum = 0;
        int shuNum = 0;
        int fuNum = 0;
        for(int j = 0;j < arr.length;j++){
            if(arr[j] > 0 && j >= (int)'a' && j <= (int)'z'){
                xiaoNum++;
            }else if(arr[j] > 0 && j >= (int)'A' && j <= (int)'Z'){
                daNum++;
            }else if(arr[j] > 0 && j >= (int)'0' && j <= (int)'9'){
                shuNum++;
            }else if(arr[j] > 0){
                fuNum++;
            }
        }
        //判断字母
        if((xiaoNum == 0 && daNum != 0) || (xiaoNum != 0 && daNum == 0)){
            res += 10;
        }else if(xiaoNum != 0 && daNum != 0){
            res += 20;
        }
        //判断数字
        if(shuNum == 1){
            res += 10;
        }else if(shuNum > 1){
            res += 20;
        }
        //判断符号
        if(fuNum == 1){
            res += 10;
        }else if(fuNum > 1){
            res += 25;
        }
        //奖励
        if(shuNum > 0 && (daNum > 0 || xiaoNum > 0)){
            res += 2;
            if(fuNum > 0){
                res += 1;
                if(daNum > 0 && xiaoNum > 0){
                    res += 2;
                }
            }
        }
        if(res >= 90){
            System.out.println("VERY_SECURE");
        }else if(res >= 80){
            System.out.println("SECURE");
        }else if(res >= 70){
            System.out.println("VERY_STRONG");
        }else if(res >= 60){
            System.out.println("STRONG");
        }else if(res >= 50){
            System.out.println("AVERAGE");
        }else if(res >= 25){
            System.out.println("WEAK");
        }else if(res >= 0){
            System.out.println("VERY_WEAK");
        }
    }
}
